package com.honweek;
//在子线程中输出1-100之间的偶数，主线程输出1-100之间的奇数。
public class Demo3 {
    public static void main(String[] args) {
        Mythread3 mt = new Mythread3("子线程--》");
        mt.start();
        for(int i =0; i<100; i++){
            System.out.println("main线程--》"+i);
        }
    }
}

class Mythread3 extends Thread{
   public Mythread3(String name){
       super(name);
   }

    @Override
    public void run() {
        for(int i =0; i<100; i++){
            System.out.println(getName()+i);
        }
    }
}